import request from '@/utils/request'

export function listStorage(query) {
  return request({
    url: '/storage/list',
    method: 'get',
    params: query
  })
}

//老版本「本地存储」
export function createStorage(data) {
  return request({
    //url: '/storage/create',
    url: '/minio/upload',
    method: 'post',
    data
  })
}

//minio存储
export function createMinioStorage(data) {
  return request({
    url: '/minio/upload',
    method: 'post',
    data
  })
}
export function readStorage(data) {
  return request({
    url: '/storage/read',
    method: 'get',
    data
  })
}

export function updateStorage(data) {
  return request({
    url: '/storage/update',
    method: 'post',
    data
  })
}

export function deleteStorage(data) {
  return request({
    url: '/storage/delete',
    method: 'post',
    data
  })
}

const uploadPath = process.env.BASE_API + '/minio/upload'

const uploadApkPath = process.env.BASE_API + '/version/uploadFile'

const uploadMinioPath = process.env.BASE_API + '/posad/posAdMiniio'
const easyExcelPath = process.env.BASE_API + '/easyExcel/imports'

const shopMerchandiseExcelPath = process.env.BASE_API + '/shopMerchandise/import'

//导入总部原料
const hqMerchandiseExcelPath = process.env.BASE_API + '/hq/import'
export { uploadPath,easyExcelPath,uploadMinioPath ,uploadApkPath ,shopMerchandiseExcelPath,hqMerchandiseExcelPath}
